#!/bin/bash
cd ~;
source ~/.bash_alias
shopt -s  expand_aliases
time1=$(date +"%Y%m%d")
echo $time1
#获取传入的参数
MgrName=$1
echo $MgrName
type=$2
echo $type
cdl;
if [ "$MgrName" = "home" ];then
FileName="Home_"$time1".log";

elif [ "$MgrName" = "trans" ];then
FileName="HM_"$time1"_sc_transMgr.log"

else
echo "params error"
exit
fi
echo $FileName

if [ "$type" = "-f" ];then
tail -f $FileName
else
vim $FileName
fi